package com.mingqijia.gassafety.db.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mingqijia.gassafety.db.entity.annotation.OperateLogFiled;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * <p>
 * 报警策略
 * </p>
 *
 * @author zhangfei
 * @since 2022-02-25
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_gss_warn_strategy")
@ApiModel(value = "WarnStrategy对象", description = "报警策略")
public class WarnStrategy extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "规则名称")
    @TableField("rule_name")
    @OperateLogFiled(name = "规则名称", dict = "rule_name")
    private String ruleName;

    @OperateLogFiled(name = "策略对象", codeName = "0-所有客户;1-按照行业选择;2-按照客户选择;3-套餐名称;")
    @ApiModelProperty(value = "策略对象：0所有客户 1按照行业选择 2按照客户选择 3-套餐名称;")
    @TableField("strategy_obj")
    private Integer strategyObj;

    @OperateLogFiled(name = "行业", dict = "strategy_obj_values")
    @ApiModelProperty(value = "行业或者客户数据：；号隔开")
    @TableField("strategy_obj_values")
    private String strategyObjValues;

    @ApiModelProperty(value = "策略设备：0所有设备")
    @TableField("strategy_equipment")
    private Integer strategyEquipment;
    @OperateLogFiled(name = "报警值1", dict = "low_report")
    @ApiModelProperty(value = "低报 %")
    @TableField("low_report")
    private String lowReport;

    @ApiModelProperty(value = "报警方式：1本地消息中心 2 短信推送 3微信推送 4外呼")
    @TableField("low_type")
    private Integer lowType;
    @OperateLogFiled(name = "本地消息中心", dict = "low_report_interval")
    @ApiModelProperty(value = "本地消息中心报警间隔")
    @TableField("low_report_interval")
    private String lowReportInterval;
    @OperateLogFiled(name = "微信模版消息", dict = "low_wx_interval")
    @ApiModelProperty(value = "微信模版消息报警间隔")
    @TableField("low_wx_interval")
    private String lowWxInterval;
    @OperateLogFiled(name = "短信消息", dict = "low_send_interval")
    @ApiModelProperty(value = "短信报警间隔")
    @TableField("low_send_interval")
    private String lowSendInterval;

    @OperateLogFiled(name = "机器人外呼", dict = "low_call_interval")
    @ApiModelProperty(value = "外呼报警间隔")
    @TableField("low_call_interval")
    private String lowCallInterval;
    @OperateLogFiled(name = "报警值2", dict = "high_report")
    @ApiModelProperty(value = "高报 %")
    @TableField("high_report")
    private String highReport;

    @ApiModelProperty(value = "报警方式：1本地消息中心 2 短信推送 3微信推送 4外呼")
    @TableField("high_type")
    private Integer highType;
    @OperateLogFiled(name = "本地消息中心", dict = "high_report_interval")
    @ApiModelProperty(value = "本地消息中心报警间隔")
    @TableField("high_report_interval")
    private String highReportInterval;

    @OperateLogFiled(name = "微信模版消息", dict = "high_wx_interval")
    @ApiModelProperty(value = "微信模版消息报警间隔")
    @TableField("high_wx_interval")
    private String highWxInterval;
    @OperateLogFiled(name = "短信消息", dict = "high_send_interval")
    @ApiModelProperty(value = "短信报警间隔")
    @TableField("high_send_interval")
    private String highSendInterval;
    @OperateLogFiled(name = "机器人外呼", dict = "high_call_interval")
    @ApiModelProperty(value = "外呼报警间隔")
    @TableField("high_call_interval")
    private String highCallInterval;
    @OperateLogFiled(name = "高报微信手机号", dict = "high_wx_phones")
    @ApiModelProperty(value = "高报微信手机号")
    @TableField("high_wx_phones")
    private String highWxPhones="";
    @OperateLogFiled(name = "低报微信手机号", dict = "low_wx_phones")
    @ApiModelProperty(value = "低报微信手机号")
    @TableField("low_wx_phones")
    private String lowWxPhones="";

    @ApiModelProperty(value = "备注说明")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "状态")
    @TableField("is_disabled")
    private Integer isDisabled;

    /**
     * 校验设备状态为报警：0不校验 1校验
     */
    @OperateLogFiled(name = "策略设备状态", codeName = "0-不校验;1-校验")
    @TableField("check_device_state")
    @ApiModelProperty(value = "校验设备状态为报警")
    private Integer checkDeviceState;

    /**
     * 创建日期最大范围
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "更新时间")
    private Date createdAtEnd;

    @ApiModelProperty(value = "高报外呼时是否发送短信 0代表发送 1代表不发送")
    @TableField("high_call_send_note")
    private Integer highCallSendNote;

    @ApiModelProperty(value = "低报外呼时是否发送短信 0代表发送 1代表不发送")
    @TableField("low_call_send_note")
    private Integer lowCallSendNote;

    @OperateLogFiled(name = "高报短信推送模板CODE")
    @ApiModelProperty(value = "高报短信推送模板CODE，可以为空，为空取默认")
    @TableField("high_sms_msg_code")
    private String highSmsMsgCode;

    @OperateLogFiled(name = "高报微信推送模板CODE")
    @ApiModelProperty(value = "高报微信推送模板CODE，可以为空，为空取默认")
    @TableField("high_wx_msg_code")
    private String highWxMsgCode;

    @OperateLogFiled(name = "低报短信推送模板CODE")
    @ApiModelProperty(value = "低报短信推送模板CODE，可以为空，为空取默认")
    @TableField("low_sms_msg_code")
    private String lowSmsMsgCode;

    @OperateLogFiled(name = "低报微信推送模板CODE")
    @ApiModelProperty(value = "低报微信推送模板CODE，可以为空，为空取默认")
    @TableField("low_wx_msg_code")
    private String lowWxMsgCode;
}
